-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug with empty initialize_params
block
#664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 comment that may not be necessary, and looks good to me.
is.Attributes["boot_disk.0.initialize_params.0.size"] == "") && | ||
is.Attributes["boot_disk.0.initialize_params.0.type"] == "" && | ||
is.Attributes["boot_disk.0.initialize_params.0.image"] == "" { | ||
is.Attributes["boot_disk.0.initialize_params.#"] = "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth calling delete(is.Attributes, "boot_disk.0.initialize_params.INSERT_EVERY_ATTRIBUTE_HERE")
to get a properly clean state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, can't hurt. Done.
👍 LGTM |
…shicorp#664) Signed-off-by: Modular Magician <[email protected]>
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
In old versions of Terraform,
disk.size
was being set to "0" in state for disks that did not specify a size parameter. Check for this case when checking that the field is empty, and fix states that accidentally added aninitialize_params
block to theboot_disk
during the migration in the above scenario.Part of #658.